package com.tech.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * 页面展示Controller
 * <p>Title: PageController</p>
 * <p>Description: </p>
 *
 * @version 1.0
 */
@Controller
public class PageJumpController {

    /**
     * @return {@link }
     * @Title showIndex
     * @Description /modules/sys/
     * @since 2018年5月27日 下午6:58:25
     */
    @RequestMapping("/")
    public String showIndex() {
        return "/modules/sys/index";
    }

    @RequestMapping("/{page}")
    public String showPage(@PathVariable String page) {
        return "/modules/sys/" + page;
    }

    /**
     * 根据不同的模块进行页面跳转
     * @param source
     * @param page
     * @return
     */
    @RequestMapping("/{source}/{page}")
    public String showPage(@PathVariable String source, @PathVariable String page) {
        return "/modules/"+source+"/" + page;
    }

}
